package com.peach.mapper;

import com.peach.pojo.Activity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ActivityMapper {
    List<Activity> selectAllActivities(@Param("activityAuthor") String activityAuthor,
                                      @Param("activityContent") String activityContent);
    Boolean updateOneActivity(Activity activity);
    Boolean deleteOneActivity(Integer activityId);
    Boolean insertOneActivity(Activity activity);

    List<Activity> selectAllActivitiesByUser(Integer activityUserId);
    Activity selectActivityById(Integer activityId);

    Boolean updateActivityState0_1(@Param("activityId") Integer activityId,
                                   @Param("activityUserId")  Integer activityUserId);
    Boolean updateActivityState1_2(Integer activityId);
}